from dajax.core import Dajax
from dajaxice.core import dajaxice_functions
from django.utils import simplejson
import random

def test_dajaxice_alert(request):
    return simplejson.dumps({'message':'Hello World'})
dajaxice_functions.register(test_dajaxice_alert)

def test_dajax_randomize(request):
    dajax = Dajax()
    dajax.assign('#result', 'value', random.randint(1, 10))
    return dajax.json()
dajaxice_functions.register(test_dajax_randomize)
